﻿using System.Collections.Generic;
using System.Reflection;
using System.Threading.Tasks;

namespace Sidvall.Reflection
{
    public interface ICode
    {
        Task<Assembly> GetAssemblyAsync(byte[] rawAssembly);

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
        Task<IEnumerable<Assembly>> GetAssembliesAsync();

        string[] GetAssemblyTypeNames(Assembly assembly, bool? isClass, bool? isAbstract, bool? isPublic, TypeInfo baseType);

        IEnumerable<FieldInfo> GetFields(System.Type type, bool? isInterface, bool? isAbstract, bool? isPublic, string name);

        IEnumerable<PropertyInfo> GetProperties(System.Type type, bool? isInterface, bool? isAbstract, bool? isPublic, string name);
    }
}
